/*
 * Copyright (c) 2017, Li Bo/Alex All rights reserved.
 * 
 * http://blog.sina.com.cn/alex4java
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
package net.alex.jetty.demo;

import net.alex.jetty.bean.JettyRunConfigure;
import net.alex.jetty.exec.mortbay.MorbayServerRunner;
import net.alex.jetty.server.JettyServer;

/**
 * @ClassName: StartJettyServer
 * @Description: 启动
 * @author: 李博/Alex
 * @date: 2017-2-27 上午10:34:40
 * @email:  alexlibochn@china-pui.com.cn
 */
public final class StartJettyServer {


	public void test1(){
		
		JettyRunConfigure configure = new JettyRunConfigure();
		configure.setContextPath("/jetty");
		configure.setDeployResourceBasePath("D:\\codes\\work-20181023\\standard-webmvc\\src\\main\\webapp");
		configure.setPort(8089);
		MorbayServerRunner.newInstance().start(configure);
		//JettyServerRunner.newInstance().start("F:/myeclipse-workspace-webManger/myjetty/jetty/etc/jetty-start.xml");
	}
	public void test2(){
		
		JettyRunConfigure configure = new JettyRunConfigure();
		configure.setContextPath("/jetty");
		configure.setDeployResourceBasePath("D:\\codes\\work-20181023\\standard-webmvc\\src\\main\\webapp");
		configure.setPort(8089);
		new JettyServer(configure).startServer();
		//JettyServerRunner.newInstance().start("F:/myeclipse-workspace-webManger/myjetty/jetty/etc/jetty-start.xml");
	}

	 public static void main(String[] args){
		new StartJettyServer().test1();
	 }
	
	
}
